package com.candy.util;

import com.candy.service.IAccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Client {
    public static void main(String[] args) {
//        IAccountService accountService=new AccountServiceImpl();
//        accountService.saveAccount();
        ClassPathXmlApplicationContext ac=new ClassPathXmlApplicationContext("bean.xml");
//        ApplicationContext ac=new FileSystemXmlApplicationContext("C:\\Users\\Administrator\\Desktop\\bean.xml");
       IAccountService accountService=(IAccountService) ac.getBean("AccountService");
//        IAccountService accountService2=(IAccountService) ac.getBean("AccountService");
//        System.out.println(accountService==accountService2);
        System.out.println(accountService);
//        ac.close();



    }
}
